/*
 * @ author madman 
 * @ use 其他schema
 */
var mongoose = require("mongoose");
var Schema = mongoose.Schema;
var shortid = require('shortid');
var projectSchema = new Schema({
    // 文章ID
     _id: {
        type: String,
        'default': shortid.generate
    },
     // 专题别名
     alias: {
        type: String,
        required: true
    },
    // 专题介绍
    describe: {
      type: String
    },
    // 专题标题
    name: {
        type: String,
    },
    // 详情
    content: {
        type: String,
    },
    // 新建时间
    createdAt: {
        type: Date,
        default: Date.now
    },
    // 更新时间
    updataAt: {
        type: Date
    }
});
module.exports = mongoose.model('j_project', projectSchema, 'j_project');